<template>
  <div class="lefttwocom" style="height: 100%;width:100%;">
    <div style="width:100%;height:100%;" class="fccc">
      <dv-scroll-board :config="config" style="width:80%;height:80%;" />
    </div>
  </div>
</template>
<script>
import echarts from "echarts";
import mixins from "../chartmixins";

export default {
  mixins: [mixins],
  components: {},
  data() {
    return {
      config: {
        header: ["告警类型", "时间"],
        data: [],
        // index: true,
        headerBGC: "#0000",
        oddRowBGC: "#0000",
        evenRowBGC: "#0000",
        // columnWidth: [50],
        align: ["left", "left", "left"]
      },
      aaa: [
        ["2019-01-01 19:25:00", "成都站门架掉线", "严重"],
        ["2019-01-04 15:25:00", "龙泉驿站门架机柜温度过高", "轻微"],
        ["2019-01-05 14:25:00", "洛带站门架水浸报警", "严重"],
        ["2019-01-06 13:25:00", "羊马站门架空调掉线", "严重"],
        ["2019-01-02 17:25:00", "简阳站门架空调损坏", "严重"],
        ["2019-01-01 12:25:00", "禾丰站门架ups掉线", "严重"],
        ["2019-01-08 11:25:00", "高寿站门架电池组异常", "轻微"],
        ["2019-01-03 16:25:00", "乐至站门架温度异常", "严重"],
        ["2019-01-09 10:25:00", "石湍站门架空调掉线", "轻微"],
        ["2019-01-10 09:25:00", "兴隆站门架门锁异常", "严重"]
      ]
    };
  },
  computed: {},
  watch: {},
  mounted() {
    this.config.data = [];

    this.aaa.map((item, index) => {
      if (index < 3) {
        this.config.data.push([
          '<span style="color:#DBB609;">' + item[1] + "</span>",
          '<span style="color:#DBB609;">' + item[0] + "</span>"
        ]);
      } else {
        this.config.data.push([item[1],item[0]]);
      }
    });
  },
  methods: {}
};
</script>
<style lang='scss' scoped>
</style>
